<template>
  <svg class="icon" aria-hidden="true" :style="IconStyle">
    <use :xlink:href="IconName"></use>
  </svg>
</template>

<script>
import "../../assets/js/font2";
export default {
  name: "LmIcon",
  props: {
    name: {
      type: String,
      default: "",
    },
    size: {
      type: String,
      default: "30",
    },
    color: {
      type: String,
      default: "",
    },
  },
  computed: {
    IconName() {
      return `#icon-${this.name}`;
    },
    IconStyle() {
      return {
        color: this.color,
        fontSize: `${this.size}px`,
      };
    },
  },
};
</script>
<style type="text/css">
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>